home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-1.iso
/
sound
/
simul100.zip
/
SIMUL.DOC
< prev
next >
Wrap
Text File
|
1995-12-27
|
3KB
|
73 lines
S I M U L
v1.00
Ethan Brodsky
12/27/1995
SIMUL - Simultaneous recording and playback on the SB16
Copyright 1995 by Ethan Brodsky. All right reserved.
***********************************************************************
A recurring topic in sound programming newsgroups is the possibility of
simultaneous recording (A/D) and playback (D/A) on Sound Blaster sound
cards.
Early in 1995, I released a package called SBProcess, which was supposed
to do this by using polled "direct" sampling. Unfortunately, this
method only worked on certain SB models, mostly older cards, and the
sound quality was horrible. The method only supported 8-bit mono sound,
and the highest sampling rate I could reach was about 10khz.
After the failure of that method, I realized that the SB16 supported two
DMA channels, and could possibly be used for simultaneous sound. The
SB16 has separate command for 8-bit and 16-bit sampling, as well as for
recording and playback. I had been recommending this method to all who
asked, but I hadn't tried it out for myself. (Although a package using
this method has since been released, source code to it is not freely
available)
Now that I have some free time, I decided to try it out for myself. The
result is a Borland C real-mode module supporting 16-bit input and 8-bit
output simultaneously. I have also written an example program using the
module. It implements an "echo", outputting whatever it hears, with a
delay. The code only supports the SB16, but it will work all the way up
to 44khz, and the method can also be used for stereo sound. The only
limitation is that the two types of I/O be done using different DMA
channels. I have found no way to solve this problem.
The code may be freely distributed in its original form as long as the
copyright notice and documentation are included, preferably contained in
the original ZIP file. The code or method explained in it may be used
for any purpose. Please give credit to Ethan Brodsky. I would also
appreciate it if you would tell me how you are using it. If it is being
used for commercial purposes, I would appreciate a contribution.
The demo program is configured for my SB16, at 220h/5/1/5. If you have
a different configuration, you must change the constants in the DELAY.C.
I had to use some conditional compiliation directives to get the SIMUL
module to compile in all memory models, but I was unable to get the
DELAY demo program to work in anything but the large model.
I haven't written this code to handle all errors, but it should work on
any sound card that supports this method. I'm not sure whether the
interrupt status register is supported on all compatibles, so the code
may have to be modified for them. The newest version will always be
available from my WWW page, as well as the simtel and x2ftp public FTP
sites.
I hope you find this useful,
Ethan Brodsky
Address: Ethan Brodsky
4010 Cherokee Dr.
Madison, WI
53711
Phone: (608) 238-4830
email: ebrodsky@pobox.com
ericbrodsky@psl.wisc.edu (Temporarily)
www: http://www.pobox.com/~ebrodsky/
http://www.xraylith.wisc.edu/~ebrodsky/